package com.juntuo.Enums;

public enum InstitutionStatus {

    VDE(1, "VDE"),
    TUVR(2, "TUV莱茵"),
    TUVSUD(3, "TUV南德"),
    SAA(4, "SAA"),
    DEKRA(5, "DEKRA(KEMA)"),
    UL(6, "UL"),
    BV(7, "BV"),
    ITS_GS(8, "ITS(GS)"),
    ITS_S_ENEC(9, "ITS(S&ENEC)"),
    ITS_ETL(10, "ITS(ETL)"),
    BS(11, "BS"),
    OTHER(100, "其他机构");

    private int code;

    private String desc;

    public int getCode() {
		return code;
	}

	public String getDesc() {
        return desc;
    }

    InstitutionStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    
    public static InstitutionStatus getByStatus(int status){
        InstitutionStatus result = null;
    	for (InstitutionStatus e : InstitutionStatus.values()) {
			if(e.getCode() == status){
				result = e;
				break;
			}
		}
    	return result;
    }
}
